

package com.hazelcast.logging.impl;

import javax.annotation.Nonnull;
import java.util.logging.Level;

/**
 * Defines an internal contract for logger factories.
 */
public interface InternalLoggerFactory {

    /**
     * Sets the levels of all the loggers known to this logger factory to
     * the given level. If a certain logger was already preconfigured with a more
     * verbose level than the given level, it will be kept at that more verbose
     * level.
     *
     * @param level the level to set.
     */
    void setLevel(@Nonnull Level level);

    /**
     * Resets the levels of all the loggers known to this logger factory back
     * to the default preconfigured values. Basically, undoes all the changes done
     * by the previous calls to {@link #setLevel}, if there were any.
     */
    void resetLevel();

    /**
     * Shutdown the logger factory.
     */
    default void shutdown() {
    }

}
